package springboot.study.project;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @ClassName: Application
 * @Description: 项目启动类
 * @Author: liu-hao
 * @Date: 2021-03-04 10:15
 * @Version: 1.0
 **/
@EnableScheduling
@SpringBootApplication
@MapperScan(basePackages = "springboot.study.project.mapper")
public class StudyApplication {
    public static void main(String[] args) {
        /**
         * Springboot整合Elasticsearch 在项目启动前设置一下的属性，防止报错
         * 解决netty冲突后初始化client时还会抛出异常
         * java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]
         */
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        SpringApplication.run(StudyApplication.class, args);
    }
}
